import { shallowRef } from 'vue'
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import { useUserStore, usePermissionStore, useGlobalStore } from '@/store'
import Layout from '@/layout/HomeLayout.vue'

//全局进度条的配置
NProgress.configure({
  easing: 'ease', // 动画方式
  speed: 1000, // 递增进度条的速度
  showSpinner: false, // 是否显示加载ico
  trickleSpeed: 200, // 自动递增间隔
  minimum: 0.3, // 更改启动时使用的最小百分比
  parent: 'body' //指定进度条的父容器
})

export const constantRoutes = [
  {
    path: '/',
    redirect: '/homePage'
  },
  {
    path: '/homePage',
    component: () => import('@/views/HomePage/HomePage.vue')
  },
  {
    path: '/login',
    component: () => import('@/views/Login/LoginIndex.vue')
  },
  {
    path: '/redirect',
    children: [
      {
        path: ':path(.*)',
        component: () => import('@/views/Redirect/RedirectIndex.vue')
      }
    ]
  }
]

export const asyncRoutes: RouteRecordRaw[] = [
  {
    path: '/menu',
    component: shallowRef(Layout),
    children: [
      {
        path: 'riZhaoPort',
        meta: {
          icon: '港口',
          title: '日照港'
        },
        children: [
          {
            path: 'company1',
            meta: {
              icon: '公司',
              title: '石臼港区南作业区西'
            },
            children: [ 
              {
                path: 'RZG_2_equipment',
                meta: {
                  icon: '编号',
                  title: '12000t/h堆取料机1'
                },
                children: [
                  {
                    path: 'RZG_2_KSR3_doulun',
                    meta: {
                      icon: '堆取料机',
                      title: 'KS/R3'
                    },
                    children: [
                      {
                        path: 'RZG_2_KSR3_three_dimensional-DQ',
                        meta: {
                          icon: '三维总览',
                          title: '三维总览',
                          id: '1602428118692401153'
                        },
                        component: () => import('@/views/3DOverview/threeDimensional.vue')
                      },
                      {
                        path: 'RZG_2_KSR3_shebei',
                        meta: {
                          icon: '设备管理',
                          title: '设备管理',
                          id: '1602428271566393345'
                        },
                        children: [
                          {
                            path: 'beltMotor',
                            meta: {
                              title: '皮带电机',
                              icon: '皮带电机',
                              id: '1602429164726652929'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltReducer',
                            meta: {
                              title: '皮带减速机',
                              icon: '皮带减速机',
                              id: '1602429479957958657'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltRoller',
                            meta: {
                              title: '皮带机滚筒',
                              icon: '皮带机滚筒',
                              id: '1602429619682807809'
                            },
                            component: () => import('@/views/DeviceManage/ConveyorDrum/ConveyorDrum.vue')
                          },
                          {
                            path: 'pitchMotor',
                            meta: {
                              title: '俯仰电机',
                              icon: '俯仰电机',
                              id: '1602429755943161857'
                            },
                            component: () => import('@/views/DeviceManage/PitchMotor/PitchMotor.vue')
                          },
                          {
                            path: 'rotateReducer',
                            meta: {
                              title: '回转减速箱',
                              icon: '回转减速箱',
                              id: '1602429864277839873'
                            },
                            component: () => import('@/views/DeviceManage/RotaryGearbox/RotaryGearbox.vue')
                          },
                          {
                            path: 'rotaryMotor',
                            meta: {
                              title: '回转电机',
                              icon: '回转电机',
                              id: '1602429970519560193'
                            },
                            component: () => import('@/views/DeviceManage/RotaryMotor/RotaryMotor.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_KSR3_ProductionStatistics-DQ',
                        meta: {
                          icon: '生产统计',
                          title: '生产统计',
                          id: '1602428702065561601'
                        },
                        component: () => import('@/views/ProductionStatistics/ProductionStatistics.vue')
                      },
                      {
                        path: 'RZG_2_KSR3_Mems',
                        meta: {
                          icon: '倾角仪',
                          title: '倾角仪',
                          id: '1602428935226920961'
                        },
                        component: () => import('@/views/Inclinometer/inclinometerPage.vue')
                      },
                      {
                        path: 'RZG_2_KSR3_structure',
                        meta: {
                          icon: '金属结构监评',
                          title: '金属结构监评',
                          id: '1602429055389536257'
                        },
                        component: () => import('@/views/Test/TestIndex.vue'),
                        children: [
                          {
                            path: 'overview-DQ',
                            meta: {
                              icon: '钢结构管理',
                              title: '钢结构管理',
                              id: '1602430087179931649'
                            },
                            component: () => import('@/views/MetalStructure/SteelStructureManage/SteelStructureManage.vue')
                          },
                          {
                            path: 'BucketAxle',
                            meta: {
                              icon: '三轴管理',
                              title: '三轴管理',
                              id: '1602430241983303681'
                            },
                            component: () => import('@/views/MetalStructure/ThreeAxisManage/ThreeAxisManage.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_KSR3_electricalInformation',
                        meta: {
                          icon: '电气信息',
                          title: '电气信息',
                          id: '1602430617293819905'
                        },
                        component: () => import('@/views/ElectricalInfo/ElectricalInfo.vue')
                      },
                      {
                        path: 'RZG_2_KSR3_Point',
                        meta: {
                          icon: '手持测点数据',
                          title: '手持测点数据',
                          id: '1694294644185239553'
                        },
                        component: () => import('@/views/MeasurePointData/MeasurePointData.vue')
                      }
                    ]
                  },
                  {
                    path: 'RZG_2_KSR5_doulun',
                    meta: {
                      icon: '堆取料机',
                      title: 'KS/R5'
                    },
                    children: [
                      {
                        path: 'RZG_2_KSR5_three_dimensional-DQ',
                        meta: {
                          icon: '三维总览',
                          title: '三维总览',
                          id: '1535132339636670465'
                        },
                        component: () => import('@/views/3DOverview/threeDimensional.vue')
                      },
                      {
                        path: 'RZG_2_KSR5_shebei',
                        meta: {
                          icon: '设备管理',
                          title: '设备管理',
                          id: '1535122471303385089'
                          
                        },
                        children: [
                          {
                            path: 'beltMotor',
                            meta: {
                              title: '皮带电机',
                              icon: '皮带电机',
                              id: '1535133454277152769'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltReducer',
                            meta: {
                              title: '皮带减速机',
                              icon: '皮带减速机',
                              id: '1535133614398902273'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltRoller',
                            meta: {
                              title: '皮带机滚筒',
                              icon: '皮带机滚筒',
                              id: '1535133761207930881'
                            },
                            component: () => import('@/views/DeviceManage/ConveyorDrum/ConveyorDrum.vue')
                          },
                          {
                            path: 'pitchMotor',
                            meta: {
                              title: '俯仰电机',
                              icon: '俯仰电机',
                              id: '1535133916875329537'
                            },
                            component: () => import('@/views/DeviceManage/PitchMotor/PitchMotor.vue')
                          },
                          {
                            path: 'rotateReducer',
                            meta: {
                              title: '回转减速箱',
                              icon: '回转减速箱',
                              id: '1535134253937987585'
                            },
                            component: () => import('@/views/DeviceManage/RotaryGearbox/RotaryGearbox.vue')
                          },
                          {
                            path: 'rotaryMotor',
                            meta: {
                              title: '回转电机',
                              icon: '回转电机',
                              id: '1535134106143297537'
                            },
                            component: () => import('@/views/DeviceManage/RotaryMotor/RotaryMotor.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_KSR5_ProductionStatistics-DQ',
                        meta: {
                          icon: '生产统计',
                          title: '生产统计',
                          id: '1535131890657398785'
                        },
                        component: () => import('@/views/ProductionStatistics/ProductionStatistics.vue')
                      },
                      {
                        path: 'RZG_2_KSR5_Mems',
                        meta: {
                          icon: '倾角仪',
                          title: '倾角仪',
                          id: '1535132641412648961'
                        },
                        component: () => import('@/views/Inclinometer/inclinometerPage.vue')
                      },
                      {
                        path: 'RZG_2_KSR5_structure',
                        meta: {
                          icon: '金属结构监评',
                          title: '金属结构监评',
                          id: '1538453268097798145'
                        },
                        component: () => import('@/views/Test/TestIndex.vue'),
                        children: [
                          {
                            path: 'overview-DQ',
                            meta: {
                              icon: '钢结构管理',
                              title: '钢结构管理',
                              id: '1538453407751344129'
                            },
                            component: () => import('@/views/MetalStructure/SteelStructureManage/SteelStructureManage.vue')
                          },
                          {
                            path: 'BucketAxle',
                            meta: {
                              icon: '三轴管理',
                              title: '三轴管理',
                              id: '1538453489523494913'
                            },
                            component: () => import('@/views/MetalStructure/ThreeAxisManage/ThreeAxisManage.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_KSR5_electricalInformation',
                        meta: {
                          icon: '电气信息',
                          title: '电气信息',
                          id: '1535505356355145729'
                        },
                        component: () => import('@/views/ElectricalInfo/ElectricalInfo.vue')
                      },
                      {
                        path: 'RZG_2_KSR5_Point',
                        meta: {
                          icon: '手持测点数据',
                          title: '手持测点数据',
                          id: '1694281094242897921'
                        },
                        component: () => import('@/views/MeasurePointData/MeasurePointData.vue')
                      }
                    ]
                  }
                ]
              },
              {
                path: 'RZG_2_equipment2',
                meta: {
                  icon: '编号',
                  title: '9000t/h堆料机',
                  id: '1549358564022292481'
                },
                children: [
                  {
                    path: 'RZG_2_MS3_doulun',
                    meta: {
                      icon: '堆取料机',
                      title: 'MS3'
                    },
                    children: [
                      {
                        path: 'RZG_2_MS3_three_dimensional-D',
                        meta: {
                          icon: '三维总览',
                          title: '三维总览',
                          id: '1549359308116987905'
                        },
                        component: () => import('@/views/3DOverview/threeDimensional.vue')
                      },
                      {
                        path: 'RZG_2_MS3_shebei',
                        meta: {
                          icon: '设备管理',
                          title: '设备管理',
                          id: '1602708677582786561'
                          
                        },
                        children: [
                          {
                            path: 'beltMotor',
                            meta: {
                              title: '皮带电机',
                              icon: '皮带电机',
                              id: '1602709375519166465'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltReducer',
                            meta: {
                              title: '皮带减速机',
                              icon: '皮带减速机',
                              id: '1602709516238065665'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltRoller',
                            meta: {
                              title: '皮带机滚筒',
                              icon: '皮带机滚筒',
                              id: '1602709612002414593'
                            },
                            component: () => import('@/views/DeviceManage/ConveyorDrum/ConveyorDrum.vue')
                          },
                          {
                            path: 'pitchMotor',
                            meta: {
                              title: '俯仰电机',
                              icon: '俯仰电机',
                              id: '1535165892475329537'
                            },
                            component: () => import('@/views/DeviceManage/PitchMotor/PitchMotor.vue')
                          },
                          {
                            path: 'rotateReducer',
                            meta: {
                              title: '回转减速箱',
                              icon: '回转减速箱',
                              id: '1602709823097540609'
                            },
                            component: () => import('@/views/DeviceManage/RotaryGearbox/RotaryGearbox.vue')
                          },
                          {
                            path: 'rotaryMotor',
                            meta: {
                              title: '回转电机',
                              icon: '回转电机',
                              id: '1602709901237424129'
                            },
                            component: () => import('@/views/DeviceManage/RotaryMotor/RotaryMotor.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_MS3_ProductionStatistics-DQ',
                        meta: {
                          icon: '生产统计',
                          title: '生产统计',
                          id: '1740573516425728001'
                        },
                        component: () => import('@/views/ProductionStatistics/ProductionStatistics.vue')
                      },
                      {
                        path: 'RZG_2_MS3_Mems',
                        meta: {
                          icon: '倾角仪',
                          title: '倾角仪',
                          id: '1602709066105360385'
                        },
                        component: () => import('@/views/Inclinometer/inclinometerPage.vue')
                      },
                      {
                        path: 'RZG_2_MS3_structure',
                        meta: {
                          icon: '金属结构监评',
                          title: '金属结构监评',
                          id: '1602709231528710145'
                        },
                        children: [
                          {
                            path: 'overview-D',
                            meta: {
                              icon: '钢结构管理',
                              title: '钢结构管理',
                              id: '1602710000797618177'
                            },
                            component: () => import('@/views/MetalStructure/SteelStructureManage/SteelStructureManage.vue')
                          },
                          {
                            path: 'BucketAxle',
                            meta: {
                              icon: '三轴管理',
                              title: '三轴管理',
                              id: '1602710092015341569'
                            },
                            component: () => import('@/views/MetalStructure/ThreeAxisManage/ThreeAxisManage.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_MS3_electricalInformation',
                        meta: {
                          icon: '电气信息',
                          title: '电气信息',
                          id: '1602710686260137985'
                        },
                        component: () => import('@/views/ElectricalInfo/ElectricalInfo.vue')
                      },
                      {
                        path: 'RZG_2_MS3_Point',
                        meta: {
                          icon: '手持测点数据',
                          title: '手持测点数据',
                          id: '1694531290696650753'
                        },
                        component: () => import('@/views/MeasurePointData/MeasurePointData.vue')
                      }
                    ]
                  },
                  {
                    path: 'RZG_2_MS4_doulun',
                    meta: {
                      icon: '堆取料机',
                      title: 'MS4',
                      id: '1602698440050085889'
                    },
                    children: [
                      {
                        path: 'RZG_2_MS4_three_dimensional-D',
                        meta: {
                          icon: '三维总览',
                          title: '三维总览',
                          id: '1602710872579510273'
                        },
                        component: () => import('@/views/3DOverview/threeDimensional.vue')
                      },
                      {
                        path: 'RZG_2_MS4_shebei',
                        meta: {
                          icon: '设备管理',
                          title: '设备管理',
                          id: '1602710984789725185'
                        },
                        children: [
                          {
                            path: 'beltMotor',
                            meta: {
                              title: '皮带电机'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltReducer',
                            meta: {
                              title: '皮带减速机'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'conveyorDrum',
                            meta: {
                              title: '皮带机滚筒'
                            },
                            component: () => import('@/views/DeviceManage/ConveyorDrum/ConveyorDrum.vue')
                          },
                          {
                            path: 'pitchMotor',
                            meta: {
                              title: '俯仰电机'
                            },
                            component: () => import('@/views/DeviceManage/PitchMotor/PitchMotor.vue')
                          },
                          {
                            path: 'rotaryGearbox',
                            meta: {
                              title: '回转减速箱'
                            },
                            component: () => import('@/views/DeviceManage/RotaryGearbox/RotaryGearbox.vue')
                          },
                          {
                            path: 'rotaryMotor',
                            meta: {
                              title: '回转电机'
                            },
                            component: () => import('@/views/DeviceManage/RotaryMotor/RotaryMotor.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_MS4_ProductionStatistics-D',
                        meta: {
                          icon: '生产统计',
                          title: '生产统计',
                          id: '1602711464974618625'
                        },
                        component: () => import('@/views/ProductionStatistics/ProductionStatistics.vue')
                      },
                      {
                        path: 'RZG_2_MS4_Mems',
                        meta: {
                          icon: '倾角仪',
                          title: '倾角仪',
                          id: '1535132641412648961'
                        },
                        component: () => import('@/views/Inclinometer/inclinometerPage.vue')
                      },
                      {
                        path: 'RZG_2_MS4_structure',
                        meta: {
                          icon: '金属结构监评',
                          title: '金属结构监评',
                          id: '1602711567005257729'
                        },
                        component: () => import('@/views/Test/TestIndex.vue'),
                        children: [
                          {
                            path: 'overview-DQ',
                            meta: {
                              icon: '钢结构管理',
                              title: '钢结构管理',
                              id: '1538453407751344129'
                            },
                            component: () => import('@/views/MetalStructure/SteelStructureManage/SteelStructureManage.vue')
                          },
                          {
                            path: 'BucketAxle',
                            meta: {
                              icon: '三轴管理',
                              title: '三轴管理',
                              id: '1538453489523494913'
                            },
                            component: () => import('@/views/MetalStructure/ThreeAxisManage/ThreeAxisManage.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_MS4_electricalInformation',
                        meta: {
                          icon: '电气信息',
                          title: '电气信息',
                          id: '1602711652124463105'
                        },
                        component: () => import('@/views/ElectricalInfo/ElectricalInfo.vue')
                      },
                      {
                        path: 'RZG_2_MS4_Point',
                        meta: {
                          icon: '手持测点数据',
                          title: '手持测点数据',
                          id: '1694531407843561473'
                        },
                        component: () => import('@/views/MeasurePointData/MeasurePointData.vue')
                      }
                    ]
                  }
                ]
              },
              {
                path: 'RZG_2_equipment3',
                meta: {
                  icon: '编号',
                  title: '4200t/h堆料机', 
                  id: '1549364309849673729'
                },
                children: [
                  {
                    path: 'RZG_2_S2_doulun',
                    meta: {
                      icon: '堆取料机',
                      title: 'S2',
                      id: '1549364542029565953'
                    },
                    children: [
                      {
                        path: 'RZG_2_S2_three_dimensional-D',
                        meta: {
                          icon: '三维总览',
                          title: '三维总览',
                          id: '1549364656303378433'
                        },
                        component: () => import('@/views/3DOverview/threeDimensional.vue')
                      },
                      {
                        path: 'RZG_2_S2_shebei',
                        meta: {
                          icon: '设备管理',
                          title: '设备管理',
                          id: '1602713075633491969'
                        },
                        children: [
                          {
                            path: 'beltMotor',
                            meta: {
                              title: '皮带电机',
                              icon: '皮带电机',
                              id: '1602713746323673089'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltReducer',
                            meta: {
                              title: '皮带减速机',
                              icon: '皮带减速机',
                              id: '1602713859033010177'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltRoller',
                            meta: {
                              title: '皮带机滚筒',
                              icon: '皮带机滚筒',
                              id: '1602713965811601409'
                            },
                            component: () => import('@/views/DeviceManage/ConveyorDrum/ConveyorDrum.vue')
                          },
                          {
                            path: 'pitchMotor',
                            meta: {
                              title: '俯仰电机',
                              icon: '俯仰电机',
                              id: '1535628492475329537'
                            },
                            component: () => import('@/views/DeviceManage/PitchMotor/PitchMotor.vue')
                          },
                          {
                            path: 'rotateReducer',
                            meta: {
                              title: '回转减速箱',
                              icon: '回转减速箱',
                              id: '1602714155431890945'
                            },
                            component: () => import('@/views/DeviceManage/RotaryGearbox/RotaryGearbox.vue')
                          },
                          {
                            path: 'rotaryMotor',
                            meta: {
                              title: '回转电机',
                              icon: '回转电机',
                              id: '1602714230690287617'
                            },
                            component: () => import('@/views/DeviceManage/RotaryMotor/RotaryMotor.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_S2_ProductionStatistics-D',
                        meta: {
                          icon: '生产统计',
                          title: '生产统计',
                          id: '1740572526381240321'
                        },
                        component: () => import('@/views/ProductionStatistics/ProductionStatistics.vue')
                      },
                      {
                        path: 'RZG_2_S2_Mems',
                        meta: {
                          icon: '倾角仪',
                          title: '倾角仪',
                          id: '1602713392030814209'
                        },
                        component: () => import('@/views/Inclinometer/inclinometerPage.vue')
                      },
                      {
                        path: 'RZG_2_S2_structure',
                        meta: {
                          icon: '金属结构监评',
                          title: '金属结构监评',
                          id: '1602713520435236865'
                        },
                        children: [
                          {
                            path: 'overview-D',
                            meta: {
                              icon: '钢结构管理',
                              title: '钢结构管理',
                              id: '1602714325687078913'
                            },
                            component: () => import('@/views/MetalStructure/SteelStructureManage/SteelStructureManage.vue')
                          },
                          {
                            path: 'BucketAxle',
                            meta: {
                              icon: '三轴管理',
                              title: '三轴管理',
                              id: '1602714426522341377'
                            },
                            component: () => import('@/views/MetalStructure/ThreeAxisManage/ThreeAxisManage.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_S2_electricalInformation',
                        meta: {
                          icon: '电气信息',
                          title: '电气信息',
                          id: '1602713615847264257'
                        },
                        component: () => import('@/views/ElectricalInfo/ElectricalInfo.vue')
                      },
                      {
                        path: 'RZG_2_S2_Point',
                        meta: {
                          icon: '手持测点数据',
                          title: '手持测点数据',
                          id: '1694531595949707265'
                        },
                        component: () => import('@/views/MeasurePointData/MeasurePointData.vue')
                      }
                    ]
                  },
                  {
                    path: 'RZG_2_S3_doulun',
                    meta: {
                      icon: '堆取料机',
                      title: 'S3', 
                      id: '1602719416917823489'
                    },
                    children: [
                      {
                        path: 'RZG_2_S3_three_dimensional-D',
                        meta: {
                          icon: '三维总览',
                          title: '三维总览',
                          id: '1602719689702772737'
                        },
                        component: () => import('@/views/3DOverview/threeDimensional.vue')
                      },
                      {
                        path: 'RZG_2_S3_shebei',
                        meta: {
                          icon: '设备管理',
                          title: '设备管理',
                          id: '1602719776579391489'
                        },
                        children: [
                          {
                            path: 'beltMotor',
                            meta: {
                              title: '皮带电机',
                              icon: '皮带电机',
                              id: '1602720303853735937'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltReducer',
                            meta: {
                              title: '皮带减速机',
                              icon: '皮带减速机',
                              id: '1602720406467383297'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltRoller',
                            meta: {
                              title: '皮带机滚筒',
                              icon: '皮带机滚筒',
                              id: '1602720513845760001'
                            },
                            component: () => import('@/views/DeviceManage/ConveyorDrum/ConveyorDrum.vue')
                          },
                          {
                            path: 'pitchMotor',
                            meta: {
                              title: '俯仰电机',
                              icon: '俯仰电机',
                              id: '1533165892462729537'
                            },
                            component: () => import('@/views/DeviceManage/PitchMotor/PitchMotor.vue')
                          },
                          {
                            path: 'rotateReducer',
                            meta: {
                              title: '回转减速箱',
                              icon: '回转减速箱',
                              id: '1602720706397868033'
                            },
                            component: () => import('@/views/DeviceManage/RotaryGearbox/RotaryGearbox.vue')
                          },
                          {
                            path: 'rotaryMotor',
                            meta: {
                              title: '回转电机',
                              icon: '回转电机',
                              id: '1602720876682416129'
                            },
                            component: () => import('@/views/DeviceManage/RotaryMotor/RotaryMotor.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_S3_ProductionStatistics-D',
                        meta: {
                          icon: '生产统计',
                          title: '生产统计',
                          id: '1740575717147676673'
                        },
                        component: () => import('@/views/ProductionStatistics/ProductionStatistics.vue')
                      },
                      {
                        path: 'RZG_2_S3_Mems',
                        meta: {
                          icon: '倾角仪',
                          title: '倾角仪',
                          id: '1602720051788648449'
                        },
                        component: () => import('@/views/Inclinometer/inclinometerPage.vue')
                      },
                      {
                        path: 'RZG_2_S3_structure',
                        meta: {
                          icon: '金属结构监评',
                          title: '金属结构监评',
                          id: '1602720144872837121'
                        },
                        children: [
                          {
                            path: 'overview-D',
                            meta: {
                              icon: '钢结构管理',
                              title: '钢结构管理',
                              id: '1602721001135804417'
                            },
                            component: () => import('@/views/MetalStructure/SteelStructureManage/SteelStructureManage.vue')
                          },
                          {
                            path: 'BucketAxle',
                            meta: {
                              icon: '三轴管理',
                              title: '三轴管理',
                              id: '1602721076998180865'
                            },
                            component: () => import('@/views/MetalStructure/ThreeAxisManage/ThreeAxisManage.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_S3_electricalInformation',
                        meta: {
                          icon: '电气信息',
                          title: '电气信息',
                          id: '1602720219397230593'
                        },
                        component: () => import('@/views/ElectricalInfo/ElectricalInfo.vue')
                      },
                      {
                        path: 'RZG_2_S3_Point',
                        meta: {
                          icon: '手持测点数据',
                          title: '手持测点数据',
                          id: '1694531703432941569'
                        },
                        component: () => import('@/views/MeasurePointData/MeasurePointData.vue')
                      }
                    ]
                  },
                  {
                    path: 'RZG_2_S4_doulun',
                    meta: {
                      icon: '堆取料机',
                      title: 'S4',
                      id: '1602719505052733441'
                    },
                    children: [
                      {
                        path: 'RZG_2_S4_three_dimensional-D',
                        meta: {
                          icon: '三维总览',
                          title: '三维总览',
                          id: '1602716420702344737'
                        },
                        component: () => import('@/views/3DOverview/threeDimensional.vue')
                      },
                      {
                        path: 'RZG_2_S4_shebei',
                        meta: {
                          icon: '设备管理',
                          title: '设备管理',
                          id: '1602768340579391489'
                        },
                        children: [
                          {
                            path: 'beltMotor',
                            meta: {
                              title: '皮带电机',
                              icon: '皮带电机',
                              id: '1602720303865904937'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltReducer',
                            meta: {
                              title: '皮带减速机',
                              icon: '皮带减速机',
                              id: '1602720005437383297'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltRoller',
                            meta: {
                              title: '皮带机滚筒',
                              icon: '皮带机滚筒',
                              id: '1602669513845760001'
                            },
                            component: () => import('@/views/DeviceManage/ConveyorDrum/ConveyorDrum.vue')
                          },
                          {
                            path: 'pitchMotor',
                            meta: {
                              title: '俯仰电机',
                              icon: '俯仰电机',
                              id: '1533165892462729537'
                            },
                            component: () => import('@/views/DeviceManage/PitchMotor/PitchMotor.vue')
                          },
                          {
                            path: 'rotateReducer',
                            meta: {
                              title: '回转减速箱',
                              icon: '回转减速箱',
                              id: '160231408397868033'
                            },
                            component: () => import('@/views/DeviceManage/RotaryGearbox/RotaryGearbox.vue')
                          },
                          {
                            path: 'rotaryMotor',
                            meta: {
                              title: '回转电机',
                              icon: '回转电机',
                              id: '1602500876682617129'
                            },
                            component: () => import('@/views/DeviceManage/RotaryMotor/RotaryMotor.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_S4_ProductionStatistics-D',
                        meta: {
                          icon: '生产统计',
                          title: '生产统计',
                          id: '1740551717198046673'
                        },
                        component: () => import('@/views/ProductionStatistics/ProductionStatistics.vue')
                      },
                      {
                        path: 'RZG_2_S4_Mems',
                        meta: {
                          icon: '倾角仪',
                          title: '倾角仪',
                          id: '1602652051788648649'
                        },
                        component: () => import('@/views/Inclinometer/inclinometerPage.vue')
                      },
                      {
                        path: 'RZG_2_S4_structure',
                        meta: {
                          icon: '金属结构监评',
                          title: '金属结构监评',
                          id: '1602765810872837121'
                        },
                        children: [
                          {
                            path: 'overview-D',
                            meta: {
                              icon: '钢结构管理',
                              title: '钢结构管理',
                              id: '16027216500145804417'
                            },
                            component: () => import('@/views/MetalStructure/SteelStructureManage/SteelStructureManage.vue')
                          },
                          {
                            path: 'BucketAxle',
                            meta: {
                              icon: '三轴管理',
                              title: '三轴管理',
                              id: '1602664076998954865'
                            },
                            component: () => import('@/views/MetalStructure/ThreeAxisManage/ThreeAxisManage.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_S4_electricalInformation',
                        meta: {
                          icon: '电气信息',
                          title: '电气信息',
                          id: '160265719397230593'
                        },
                        component: () => import('@/views/ElectricalInfo/ElectricalInfo.vue')
                      },
                      {
                        path: 'RZG_2_S4_Point',
                        meta: {
                          icon: '手持测点数据',
                          title: '手持测点数据',
                          id: '169453679032946469'
                        },
                        component: () => import('@/views/MeasurePointData/MeasurePointData.vue')
                      }
                    ]
                  }
                ]
              },
              {
                path: 'RZG_2_equipment1',
                meta: {
                  icon: '编号',
                  title: '4200t/h取料机',
                  id: '1549364309849673729'
                },
                children: [
                  {
                    path: 'RZG_2_R4_doulun',
                    meta: {
                      icon: '堆取料机',
                      title: 'R4',
                      id: '1549364542029565953'
                    },
                    children: [
                      {
                        path: 'RZG_2_R4_three_dimensional-Q',
                        meta: {
                          icon: '三维总览',
                          title: '三维总览',
                          id: '1549364656303378433'
                        },
                        component: () => import('@/views/3DOverview/threeDimensional.vue')
                      },
                      {
                        path: 'RZG_2_R4_shebei',
                        meta: {
                          icon: '设备管理',
                          title: '设备管理',
                          id: '1602713075633491969'
                        },
                        children: [
                          {
                            path: 'beltMotor',
                            meta: {
                              title: '皮带电机',
                              icon: '皮带电机',
                              id: '1602713746323673089'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltReducer',
                            meta: {
                              title: '皮带减速机',
                              icon: '皮带减速机',
                              id: '1602713859033010177'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltRoller',
                            meta: {
                              title: '皮带机滚筒',
                              icon: '皮带机滚筒',
                              id: '1602713965811601409'
                            },
                            component: () => import('@/views/DeviceManage/ConveyorDrum/ConveyorDrum.vue')
                          },
                          {
                            path: 'pitchMotor',
                            meta: {
                              title: '俯仰电机',
                              icon: '俯仰电机',
                              id: '1535628492475329537'
                            },
                            component: () => import('@/views/DeviceManage/PitchMotor/PitchMotor.vue')
                          },
                          {
                            path: 'rotateReducer',
                            meta: {
                              title: '回转减速箱',
                              icon: '回转减速箱',
                              id: '1602714155431890945'
                            },
                            component: () => import('@/views/DeviceManage/RotaryGearbox/RotaryGearbox.vue')
                          },
                          {
                            path: 'rotaryMotor',
                            meta: {
                              title: '回转电机',
                              icon: '回转电机',
                              id: '1602714230690287617'
                            },
                            component: () => import('@/views/DeviceManage/RotaryMotor/RotaryMotor.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_R4_ProductionStatistics-D',
                        meta: {
                          icon: '生产统计',
                          title: '生产统计',
                          id: '1740572526381240321'
                        },
                        component: () => import('@/views/ProductionStatistics/ProductionStatistics.vue')
                      },
                      {
                        path: 'RZG_2_R4_Mems',
                        meta: {
                          icon: '倾角仪',
                          title: '倾角仪',
                          id: '1602713392030814209'
                        },
                        component: () => import('@/views/Inclinometer/inclinometerPage.vue')
                      },
                      {
                        path: 'RZG_2_R4_structure',
                        meta: {
                          icon: '金属结构监评',
                          title: '金属结构监评',
                          id: '1602713520435236865'
                        },
                        children: [
                          {
                            path: 'overview-D',
                            meta: {
                              icon: '钢结构管理',
                              title: '钢结构管理',
                              id: '1602714325687078913'
                            },
                            component: () => import('@/views/MetalStructure/SteelStructureManage/SteelStructureManage.vue')
                          },
                          {
                            path: 'BucketAxle',
                            meta: {
                              icon: '三轴管理',
                              title: '三轴管理',
                              id: '1602714426522341377'
                            },
                            component: () => import('@/views/MetalStructure/ThreeAxisManage/ThreeAxisManage.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_R4_electricalInformation',
                        meta: {
                          icon: '电气信息',
                          title: '电气信息',
                          id: '1602713615847264257'
                        },
                        component: () => import('@/views/ElectricalInfo/ElectricalInfo.vue')
                      },
                      {
                        path: 'RZG_2_R4_Point',
                        meta: {
                          icon: '手持测点数据',
                          title: '手持测点数据',
                          id: '1694531595949707265'
                        },
                        component: () => import('@/views/MeasurePointData/MeasurePointData.vue')
                      }
                    ]
                  },
                  {
                    path: 'RZG_2_R5_doulun',
                    meta: {
                      icon: '堆取料机',
                      title: 'R5',
                      id: '1602719416917823489'
                    },
                    children: [
                      {
                        path: 'RZG_2_R5_three_dimensional-Q',
                        meta: {
                          icon: '三维总览',
                          title: '三维总览',
                          id: '1602719689702772737'
                        },
                        component: () => import('@/views/3DOverview/threeDimensional.vue')
                      },
                      {
                        path: 'RZG_2_R5_shebei',
                        meta: {
                          icon: '设备管理',
                          title: '设备管理',
                          id: '1602719776579391489'
                        },
                        children: [
                          {
                            path: 'beltMotor',
                            meta: {
                              title: '皮带电机',
                              icon: '皮带电机',
                              id: '1602720303853735937'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltReducer',
                            meta: {
                              title: '皮带减速机',
                              icon: '皮带减速机',
                              id: '1602720406467383297'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltRoller',
                            meta: {
                              title: '皮带机滚筒',
                              icon: '皮带机滚筒',
                              id: '1602720513845760001'
                            },
                            component: () => import('@/views/DeviceManage/ConveyorDrum/ConveyorDrum.vue')
                          },
                          {
                            path: 'pitchMotor',
                            meta: {
                              title: '俯仰电机',
                              icon: '俯仰电机',
                              id: '1533165892462729537'
                            },
                            component: () => import('@/views/DeviceManage/PitchMotor/PitchMotor.vue')
                          },
                          {
                            path: 'rotateReducer',
                            meta: {
                              title: '回转减速箱',
                              icon: '回转减速箱',
                              id: '1602720706397868033'
                            },
                            component: () => import('@/views/DeviceManage/RotaryGearbox/RotaryGearbox.vue')
                          },
                          {
                            path: 'rotaryMotor',
                            meta: {
                              title: '回转电机',
                              icon: '回转电机',
                              id: '1602720876682416129'
                            },
                            component: () => import('@/views/DeviceManage/RotaryMotor/RotaryMotor.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_R5_ProductionStatistics-D',
                        meta: {
                          icon: '生产统计',
                          title: '生产统计',
                          id: '1740575717147676673'
                        },
                        component: () => import('@/views/ProductionStatistics/ProductionStatistics.vue')
                      },
                      {
                        path: 'RZG_2_R5_Mems',
                        meta: {
                          icon: '倾角仪',
                          title: '倾角仪',
                          id: '1602720051788648449'
                        },
                        component: () => import('@/views/Inclinometer/inclinometerPage.vue')
                      },
                      {
                        path: 'RZG_2_R5_structure',
                        meta: {
                          icon: '金属结构监评',
                          title: '金属结构监评',
                          id: '1602720144872837121'
                        },
                        children: [
                          {
                            path: 'overview-D',
                            meta: {
                              icon: '钢结构管理',
                              title: '钢结构管理',
                              id: '1602721001135804417'
                            },
                            component: () => import('@/views/MetalStructure/SteelStructureManage/SteelStructureManage.vue')
                          },
                          {
                            path: 'BucketAxle',
                            meta: {
                              icon: '三轴管理',
                              title: '三轴管理',
                              id: '1602721076998180865'
                            },
                            component: () => import('@/views/MetalStructure/ThreeAxisManage/ThreeAxisManage.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_R5_electricalInformation',
                        meta: {
                          icon: '电气信息',
                          title: '电气信息',
                          id: '1602720219397230593'
                        },
                        component: () => import('@/views/ElectricalInfo/ElectricalInfo.vue')
                      },
                      {
                        path: 'RZG_2_R5_Point',
                        meta: {
                          icon: '手持测点数据',
                          title: '手持测点数据',
                          id: '1694531703432941569'
                        },
                        component: () => import('@/views/MeasurePointData/MeasurePointData.vue')
                      }
                    ]
                  },
                  {
                    path: 'RZG_2_R6_doulun',
                    meta: {
                      icon: '堆取料机',
                      title: 'R6',
                      id: '1602719505052733441'
                    },
                    children: [
                      {
                        path: 'RZG_2_R6_three_dimensional-Q',
                        meta: {
                          icon: '三维总览',
                          title: '三维总览',
                          id: '1602716420702344737'
                        },
                        component: () => import('@/views/3DOverview/threeDimensional.vue')
                      },
                      {
                        path: 'RZG_2_R6_shebei',
                        meta: {
                          icon: '设备管理',
                          title: '设备管理',
                          id: '1602768340579391489'
                        },
                        children: [
                          {
                            path: 'beltMotor',
                            meta: {
                              title: '皮带电机',
                              icon: '皮带电机',
                              id: '1602720303865904937'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltReducer',
                            meta: {
                              title: '皮带减速机',
                              icon: '皮带减速机',
                              id: '1602720005437383297'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltRoller',
                            meta: {
                              title: '皮带机滚筒',
                              icon: '皮带机滚筒',
                              id: '1602669513845760001'
                            },
                            component: () => import('@/views/DeviceManage/ConveyorDrum/ConveyorDrum.vue')
                          },
                          {
                            path: 'pitchMotor',
                            meta: {
                              title: '俯仰电机',
                              icon: '俯仰电机',
                              id: '1533165892462729537'
                            },
                            component: () => import('@/views/DeviceManage/PitchMotor/PitchMotor.vue')
                          },
                          {
                            path: 'rotateReducer',
                            meta: {
                              title: '回转减速箱',
                              icon: '回转减速箱',
                              id: '160231408397868033'
                            },
                            component: () => import('@/views/DeviceManage/RotaryGearbox/RotaryGearbox.vue')
                          },
                          {
                            path: 'rotaryMotor',
                            meta: {
                              title: '回转电机',
                              icon: '回转电机',
                              id: '1602500876682617129'
                            },
                            component: () => import('@/views/DeviceManage/RotaryMotor/RotaryMotor.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_R6_ProductionStatistics-D',
                        meta: {
                          icon: '生产统计',
                          title: '生产统计',
                          id: '1740551717198046673'
                        },
                        component: () => import('@/views/ProductionStatistics/ProductionStatistics.vue')
                      },
                      {
                        path: 'RZG_2_R6_Mems',
                        meta: {
                          icon: '倾角仪',
                          title: '倾角仪',
                          id: '1602652051788648649'
                        },
                        component: () => import('@/views/Inclinometer/inclinometerPage.vue')
                      },
                      {
                        path: 'RZG_2_R6_structure',
                        meta: {
                          icon: '金属结构监评',
                          title: '金属结构监评',
                          id: '1602765810872837121'
                        },
                        children: [
                          {
                            path: 'overview-D',
                            meta: {
                              icon: '钢结构管理',
                              title: '钢结构管理',
                              id: '16027216500145804417'
                            },
                            component: () => import('@/views/MetalStructure/SteelStructureManage/SteelStructureManage.vue')
                          },
                          {
                            path: 'BucketAxle',
                            meta: {
                              icon: '三轴管理',
                              title: '三轴管理',
                              id: '1602664076998954865'
                            },
                            component: () => import('@/views/MetalStructure/ThreeAxisManage/ThreeAxisManage.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_R6_electricalInformation',
                        meta: {
                          icon: '电气信息',
                          title: '电气信息',
                          id: '160265719397230593'
                        },
                        component: () => import('@/views/ElectricalInfo/ElectricalInfo.vue')
                      },
                      {
                        path: 'RZG_2_R6_Point',
                        meta: {
                          icon: '手持测点数据',
                          title: '手持测点数据',
                          id: '169453679032946469'
                        },
                        component: () => import('@/views/MeasurePointData/MeasurePointData.vue')
                      }
                    ]
                  },
                  {
                    path: 'RZG_2_R7_doulun',
                    meta: {
                      icon: '堆取料机',
                      title: 'R7',
                      id: '1602719505052733441'
                    },
                    children: [
                      {
                        path: 'RZG_2_R7_three_dimensional-Q',
                        meta: {
                          icon: '三维总览',
                          title: '三维总览',
                          id: '1602716420702344737'
                        },
                        component: () => import('@/views/3DOverview/threeDimensional.vue')
                      },
                      {
                        path: 'RZG_2_R7_shebei',
                        meta: {
                          icon: '设备管理',
                          title: '设备管理',
                          id: '1602768340579391489'
                        },
                        children: [
                          {
                            path: 'beltMotor',
                            meta: {
                              title: '皮带电机',
                              icon: '皮带电机',
                              id: '1602720303865904937'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltReducer',
                            meta: {
                              title: '皮带减速机',
                              icon: '皮带减速机',
                              id: '1602720005437383297'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltRoller',
                            meta: {
                              title: '皮带机滚筒',
                              icon: '皮带机滚筒',
                              id: '1602669513845760001'
                            },
                            component: () => import('@/views/DeviceManage/ConveyorDrum/ConveyorDrum.vue')
                          },
                          {
                            path: 'pitchMotor',
                            meta: {
                              title: '俯仰电机',
                              icon: '俯仰电机',
                              id: '1533165892462729537'
                            },
                            component: () => import('@/views/DeviceManage/PitchMotor/PitchMotor.vue')
                          },
                          {
                            path: 'rotateReducer',
                            meta: {
                              title: '回转减速箱',
                              icon: '回转减速箱',
                              id: '160231408397868033'
                            },
                            component: () => import('@/views/DeviceManage/RotaryGearbox/RotaryGearbox.vue')
                          },
                          {
                            path: 'rotaryMotor',
                            meta: {
                              title: '回转电机',
                              icon: '回转电机',
                              id: '1602500876682617129'
                            },
                            component: () => import('@/views/DeviceManage/RotaryMotor/RotaryMotor.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_R7_ProductionStatistics-D',
                        meta: {
                          icon: '生产统计',
                          title: '生产统计',
                          id: '1740551717198046673'
                        },
                        component: () => import('@/views/ProductionStatistics/ProductionStatistics.vue')
                      },
                      {
                        path: 'RZG_2_R7_Mems',
                        meta: {
                          icon: '倾角仪',
                          title: '倾角仪',
                          id: '1602652051788648649'
                        },
                        component: () => import('@/views/Inclinometer/inclinometerPage.vue')
                      },
                      {
                        path: 'RZG_2_R7_structure',
                        meta: {
                          icon: '金属结构监评',
                          title: '金属结构监评',
                          id: '1602765810872837121'
                        },
                        children: [
                          {
                            path: 'overview-D',
                            meta: {
                              icon: '钢结构管理',
                              title: '钢结构管理',
                              id: '16027216500145804417'
                            },
                            component: () => import('@/views/MetalStructure/SteelStructureManage/SteelStructureManage.vue')
                          },
                          {
                            path: 'BucketAxle',
                            meta: {
                              icon: '三轴管理',
                              title: '三轴管理',
                              id: '1602664076998954865'
                            },
                            component: () => import('@/views/MetalStructure/ThreeAxisManage/ThreeAxisManage.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_R7_electricalInformation',
                        meta: {
                          icon: '电气信息',
                          title: '电气信息',
                          id: '160265719397230593'
                        },
                        component: () => import('@/views/ElectricalInfo/ElectricalInfo.vue')
                      },
                      {
                        path: 'RZG_2_R7_Point',
                        meta: {
                          icon: '手持测点数据',
                          title: '手持测点数据',
                          id: '169453679032946469'
                        },
                        component: () => import('@/views/MeasurePointData/MeasurePointData.vue')
                      }
                    ]
                  },
                  {
                    path: 'RZG_2_R8_doulun',
                    meta: {
                      icon: '堆取料机',
                      title: 'R8',
                      id: '1602719505052733441'
                    },
                    children: [
                      {
                        path: 'RZG_2_R8_three_dimensional-Q',
                        meta: {
                          icon: '三维总览',
                          title: '三维总览',
                          id: '1602716420702344737'
                        },
                        component: () => import('@/views/3DOverview/threeDimensional.vue')
                      },
                      {
                        path: 'RZG_2_R8_shebei',
                        meta: {
                          icon: '设备管理',
                          title: '设备管理',
                          id: '1602768340579391489'
                        },
                        children: [
                          {
                            path: 'beltMotor',
                            meta: {
                              title: '皮带电机',
                              icon: '皮带电机',
                              id: '1602720303865904937'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltReducer',
                            meta: {
                              title: '皮带减速机',
                              icon: '皮带减速机',
                              id: '1602720005437383297'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltRoller',
                            meta: {
                              title: '皮带机滚筒',
                              icon: '皮带机滚筒',
                              id: '1602669513845760001'
                            },
                            component: () => import('@/views/DeviceManage/ConveyorDrum/ConveyorDrum.vue')
                          },
                          {
                            path: 'pitchMotor',
                            meta: {
                              title: '俯仰电机',
                              icon: '俯仰电机',
                              id: '1533165892462729537'
                            },
                            component: () => import('@/views/DeviceManage/PitchMotor/PitchMotor.vue')
                          },
                          {
                            path: 'rotateReducer',
                            meta: {
                              title: '回转减速箱',
                              icon: '回转减速箱',
                              id: '160231408397868033'
                            },
                            component: () => import('@/views/DeviceManage/RotaryGearbox/RotaryGearbox.vue')
                          },
                          {
                            path: 'rotaryMotor',
                            meta: {
                              title: '回转电机',
                              icon: '回转电机',
                              id: '1602500876682617129'
                            },
                            component: () => import('@/views/DeviceManage/RotaryMotor/RotaryMotor.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_R8_ProductionStatistics-D',
                        meta: {
                          icon: '生产统计',
                          title: '生产统计',
                          id: '1740551717198046673'
                        },
                        component: () => import('@/views/ProductionStatistics/ProductionStatistics.vue')
                      },
                      {
                        path: 'RZG_2_R8_Mems',
                        meta: {
                          icon: '倾角仪',
                          title: '倾角仪',
                          id: '1602652051788648649'
                        },
                        component: () => import('@/views/Inclinometer/inclinometerPage.vue')
                      },
                      {
                        path: 'RZG_2_R8_structure',
                        meta: {
                          icon: '金属结构监评',
                          title: '金属结构监评',
                          id: '1602765810872837121'
                        },
                        children: [
                          {
                            path: 'overview-D',
                            meta: {
                              icon: '钢结构管理',
                              title: '钢结构管理',
                              id: '16027216500145804417'
                            },
                            component: () => import('@/views/MetalStructure/SteelStructureManage/SteelStructureManage.vue')
                          },
                          {
                            path: 'BucketAxle',
                            meta: {
                              icon: '三轴管理',
                              title: '三轴管理',
                              id: '1602664076998954865'
                            },
                            component: () => import('@/views/MetalStructure/ThreeAxisManage/ThreeAxisManage.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_R8_electricalInformation',
                        meta: {
                          icon: '电气信息',
                          title: '电气信息',
                          id: '160265719397230593'
                        },
                        component: () => import('@/views/ElectricalInfo/ElectricalInfo.vue')
                      },
                      {
                        path: 'RZG_2_R8_Point',
                        meta: {
                          icon: '手持测点数据',
                          title: '手持测点数据',
                          id: '169453679032946469'
                        },
                        component: () => import('@/views/MeasurePointData/MeasurePointData.vue')
                      }
                    ]
                  },
                  {
                    path: 'RZG_2_R9_doulun',
                    meta: {
                      icon: '堆取料机',
                      title: 'R9',
                      id: '1602719505052733441'
                    },
                    children: [
                      {
                        path: 'RZG_2_R9_three_dimensional-Q',
                        meta: {
                          icon: '三维总览',
                          title: '三维总览',
                          id: '1602716420702344737'
                        },
                        component: () => import('@/views/3DOverview/threeDimensional.vue')
                      },
                      {
                        path: 'RZG_2_R9_shebei',
                        meta: {
                          icon: '设备管理',
                          title: '设备管理',
                          id: '1602768340579391489'
                        },
                        children: [
                          {
                            path: 'beltMotor',
                            meta: {
                              title: '皮带电机',
                              icon: '皮带电机',
                              id: '1602720303865904937'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltReducer',
                            meta: {
                              title: '皮带减速机',
                              icon: '皮带减速机',
                              id: '1602720005437383297'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltRoller',
                            meta: {
                              title: '皮带机滚筒',
                              icon: '皮带机滚筒',
                              id: '1602669513845760001'
                            },
                            component: () => import('@/views/DeviceManage/ConveyorDrum/ConveyorDrum.vue')
                          },
                          {
                            path: 'pitchMotor',
                            meta: {
                              title: '俯仰电机',
                              icon: '俯仰电机',
                              id: '1533165892462729537'
                            },
                            component: () => import('@/views/DeviceManage/PitchMotor/PitchMotor.vue')
                          },
                          {
                            path: 'rotateReducer',
                            meta: {
                              title: '回转减速箱',
                              icon: '回转减速箱',
                              id: '160231408397868033'
                            },
                            component: () => import('@/views/DeviceManage/RotaryGearbox/RotaryGearbox.vue')
                          },
                          {
                            path: 'rotaryMotor',
                            meta: {
                              title: '回转电机',
                              icon: '回转电机',
                              id: '1602500876682617129'
                            },
                            component: () => import('@/views/DeviceManage/RotaryMotor/RotaryMotor.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_R9_ProductionStatistics-D',
                        meta: {
                          icon: '生产统计',
                          title: '生产统计',
                          id: '1740551717198046673'
                        },
                        component: () => import('@/views/ProductionStatistics/ProductionStatistics.vue')
                      },
                      {
                        path: 'RZG_2_R9_Mems',
                        meta: {
                          icon: '倾角仪',
                          title: '倾角仪',
                          id: '1602652051788648649'
                        },
                        component: () => import('@/views/Inclinometer/inclinometerPage.vue')
                      },
                      {
                        path: 'RZG_2_R9_structure',
                        meta: {
                          icon: '金属结构监评',
                          title: '金属结构监评',
                          id: '1602765810872837121'
                        },
                        children: [
                          {
                            path: 'overview-D',
                            meta: {
                              icon: '钢结构管理',
                              title: '钢结构管理',
                              id: '16027216500145804417'
                            },
                            component: () => import('@/views/MetalStructure/SteelStructureManage/SteelStructureManage.vue')
                          },
                          {
                            path: 'BucketAxle',
                            meta: {
                              icon: '三轴管理',
                              title: '三轴管理',
                              id: '1602664076998954865'
                            },
                            component: () => import('@/views/MetalStructure/ThreeAxisManage/ThreeAxisManage.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_R9_electricalInformation',
                        meta: {
                          icon: '电气信息',
                          title: '电气信息',
                          id: '160265719397230593'
                        },
                        component: () => import('@/views/ElectricalInfo/ElectricalInfo.vue')
                      },
                      {
                        path: 'RZG_2_R9_Point',
                        meta: {
                          icon: '手持测点数据',
                          title: '手持测点数据',
                          id: '169453679032946469'
                        },
                        component: () => import('@/views/MeasurePointData/MeasurePointData.vue')
                      }
                    ]
                  },
                  {
                    path: 'RZG_2_R10_doulun',
                    meta: {
                      icon: '堆取料机',
                      title: 'R10',
                      id: '1602719505052733441'
                    },
                    children: [
                      {
                        path: 'RZG_2_R10_three_dimensional-Q',
                        meta: {
                          icon: '三维总览',
                          title: '三维总览',
                          id: '1602716420702344737'
                        },
                        component: () => import('@/views/3DOverview/threeDimensional.vue')
                      },
                      {
                        path: 'RZG_2_R10_shebei',
                        meta: {
                          icon: '设备管理',
                          title: '设备管理',
                          id: '1602768340579391489'
                        },
                        children: [
                          {
                            path: 'beltMotor',
                            meta: {
                              title: '皮带电机',
                              icon: '皮带电机',
                              id: '1602720303865904937'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltReducer',
                            meta: {
                              title: '皮带减速机',
                              icon: '皮带减速机',
                              id: '1602720005437383297'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltRoller',
                            meta: {
                              title: '皮带机滚筒',
                              icon: '皮带机滚筒',
                              id: '1602669513845760001'
                            },
                            component: () => import('@/views/DeviceManage/ConveyorDrum/ConveyorDrum.vue')
                          },
                          {
                            path: 'pitchMotor',
                            meta: {
                              title: '俯仰电机',
                              icon: '俯仰电机',
                              id: '1533165892462729537'
                            },
                            component: () => import('@/views/DeviceManage/PitchMotor/PitchMotor.vue')
                          },
                          {
                            path: 'rotateReducer',
                            meta: {
                              title: '回转减速箱',
                              icon: '回转减速箱',
                              id: '160231408397868033'
                            },
                            component: () => import('@/views/DeviceManage/RotaryGearbox/RotaryGearbox.vue')
                          },
                          {
                            path: 'rotaryMotor',
                            meta: {
                              title: '回转电机',
                              icon: '回转电机',
                              id: '1602500876682617129'
                            },
                            component: () => import('@/views/DeviceManage/RotaryMotor/RotaryMotor.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_R10_ProductionStatistics-D',
                        meta: {
                          icon: '生产统计',
                          title: '生产统计',
                          id: '1740551717198046673'
                        },
                        component: () => import('@/views/ProductionStatistics/ProductionStatistics.vue')
                      },
                      {
                        path: 'RZG_2_R10_Mems',
                        meta: {
                          icon: '倾角仪',
                          title: '倾角仪',
                          id: '1602652051788648649'
                        },
                        component: () => import('@/views/Inclinometer/inclinometerPage.vue')
                      },
                      {
                        path: 'RZG_2_R10_structure',
                        meta: {
                          icon: '金属结构监评',
                          title: '金属结构监评',
                          id: '1602765810872837121'
                        },
                        children: [
                          {
                            path: 'overview-D',
                            meta: {
                              icon: '钢结构管理',
                              title: '钢结构管理',
                              id: '16027216500145804417'
                            },
                            component: () => import('@/views/MetalStructure/SteelStructureManage/SteelStructureManage.vue')
                          },
                          {
                            path: 'BucketAxle',
                            meta: {
                              icon: '三轴管理',
                              title: '三轴管理',
                              id: '1602664076998954865'
                            },
                            component: () => import('@/views/MetalStructure/ThreeAxisManage/ThreeAxisManage.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_R10_electricalInformation',
                        meta: {
                          icon: '电气信息',
                          title: '电气信息',
                          id: '160265719397230593'
                        },
                        component: () => import('@/views/ElectricalInfo/ElectricalInfo.vue')
                      },
                      {
                        path: 'RZG_2_R10_Point',
                        meta: {
                          icon: '手持测点数据',
                          title: '手持测点数据',
                          id: '169453679032946469'
                        },
                        component: () => import('@/views/MeasurePointData/MeasurePointData.vue')
                      }
                    ]
                  },
                  {
                    path: 'RZG_2_R11_doulun',
                    meta: {
                      icon: '堆取料机',
                      title: 'R11',
                      id: '1602719505052733441'
                    },
                    children: [
                      {
                        path: 'RZG_2_R11_three_dimensional-Q',
                        meta: {
                          icon: '三维总览',
                          title: '三维总览',
                          id: '1602716420702344737'
                        },
                        component: () => import('@/views/3DOverview/threeDimensional.vue')
                      },
                      {
                        path: 'RZG_2_R11_shebei',
                        meta: {
                          icon: '设备管理',
                          title: '设备管理',
                          id: '1602768340579391489'
                        },
                        children: [
                          {
                            path: 'beltMotor',
                            meta: {
                              title: '皮带电机',
                              icon: '皮带电机',
                              id: '1602720303865904937'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltReducer',
                            meta: {
                              title: '皮带减速机',
                              icon: '皮带减速机',
                              id: '1602720005437383297'
                            },
                            component: () => import('@/views/DeviceManage/BeltMotor/beltMotor.vue')
                          },
                          {
                            path: 'beltRoller',
                            meta: {
                              title: '皮带机滚筒',
                              icon: '皮带机滚筒',
                              id: '1602669513845760001'
                            },
                            component: () => import('@/views/DeviceManage/ConveyorDrum/ConveyorDrum.vue')
                          },
                          {
                            path: 'pitchMotor',
                            meta: {
                              title: '俯仰电机',
                              icon: '俯仰电机',
                              id: '1533165892462729537'
                            },
                            component: () => import('@/views/DeviceManage/PitchMotor/PitchMotor.vue')
                          },
                          {
                            path: 'rotateReducer',
                            meta: {
                              title: '回转减速箱',
                              icon: '回转减速箱',
                              id: '160231408397868033'
                            },
                            component: () => import('@/views/DeviceManage/RotaryGearbox/RotaryGearbox.vue')
                          },
                          {
                            path: 'rotaryMotor',
                            meta: {
                              title: '回转电机',
                              icon: '回转电机',
                              id: '1602500876682617129'
                            },
                            component: () => import('@/views/DeviceManage/RotaryMotor/RotaryMotor.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_R11_ProductionStatistics-D',
                        meta: {
                          icon: '生产统计',
                          title: '生产统计',
                          id: '1740551717198046673'
                        },
                        component: () => import('@/views/ProductionStatistics/ProductionStatistics.vue')
                      },
                      {
                        path: 'RZG_2_R11_Mems',
                        meta: {
                          icon: '倾角仪',
                          title: '倾角仪',
                          id: '1602652051788648649'
                        },
                        component: () => import('@/views/Inclinometer/inclinometerPage.vue')
                      },
                      {
                        path: 'RZG_2_R11_structure',
                        meta: {
                          icon: '金属结构监评',
                          title: '金属结构监评',
                          id: '1602765810872837121'
                        },
                        children: [
                          {
                            path: 'overview-D',
                            meta: {
                              icon: '钢结构管理',
                              title: '钢结构管理',
                              id: '16027216500145804417'
                            },
                            component: () => import('@/views/MetalStructure/SteelStructureManage/SteelStructureManage.vue')
                          },
                          {
                            path: 'BucketAxle',
                            meta: {
                              icon: '三轴管理',
                              title: '三轴管理',
                              id: '1602664076998954865'
                            },
                            component: () => import('@/views/MetalStructure/ThreeAxisManage/ThreeAxisManage.vue')
                          }
                        ]
                      },
                      {
                        path: 'RZG_2_R11_electricalInformation',
                        meta: {
                          icon: '电气信息',
                          title: '电气信息',
                          id: '160265719397230593'
                        },
                        component: () => import('@/views/ElectricalInfo/ElectricalInfo.vue')
                      },
                      {
                        path: 'RZG_2_R11_Point',
                        meta: {
                          icon: '手持测点数据',
                          title: '手持测点数据',
                          id: '169453679032946469'
                        },
                        component: () => import('@/views/MeasurePointData/MeasurePointData.vue')
                      }
                    ]
                  }
                ]
              },
              {
                path: 'RZG_2_Diagnosis',
                meta: {
                  icon: '诊断详情',
                  title: '诊断详情',
                  id: '1535137549318754305'
                },
                component: () => import('@/views/DiagnosisDetail/DiagnosisDetail.vue')
              },
              {
                path: 'Attendance',
                meta: {
                  icon: '考勤管理',
                  title: '考勤管理',
                  id: '1535137943939846145'
                },
                component: () => import('@/views/WorkAttendance/WorkAttendance.vue')
              },
              {
                path: 'holdDevice',
                meta: {
                  icon: '手持信息',
                  title: '手持信息',
                  id: '1666643467415195649'
                },
                component: () => import('@/views/HandheldInfo/HandheldInfo.vue')
              }
            ]
          }
        ]
      },
      {
        path: 'systemConfig',
        meta: {
          icon: '系统配置',
          title: '系统配置'
        },
        children: [
          {
            path: 'MenuManage',
            meta: {
              icon: '权限配置',
              title: '权限配置',
              id: '1513412427860021249'
            },
            component: () => import('@/views/AuthorityConfig/AuthorityConfig.vue')
          },
          {
            path: 'AccountManage',
            meta: {
              icon: '用户管理',
              title: '用户管理',
              id: '1535135963603406849'
            },
            component: () => import('@/views/UserManage/UserManage.vue')
          },
          {
            path: 'port',
            meta: {
              icon: '港口管理',
              title: '港口管理',
              id: '1535136536956375041'
            },
            component: () => import('@/views/PortManaage/PortManaage.vue')
          },
          {
            path: 'company',
            meta: {
              icon: '公司管理',
              title: '公司管理',
              id: '1535136395465723905'
            },
            component: () => import('@/views/CompanyManage/CompanyManage.vue')
          },
          {
            path: 'equipment',
            meta: {
              icon: '设备管理',
              title: '设备类型管理',
              id: '1535136920487727105'
            },
            component: () => import('@/views/DeviceType/DeviceType.vue')
          },
          {
            path: 'barWheelMachine',
            meta: {
              icon: '堆取料机管理',
              title: '堆取料机管理',
              id: '1537633090887880705'
            },
            component: () => import('@/views/StackerReclaimer/StackerReclaimer.vue')
          },
          {
            path: 'inspection',
            meta: {
              icon: '巡检仪管理',
              title: '巡检仪管理',
              id: '1537633227173400577'
            },
            component: () => import('@/views/PatrolInstrument/PatrolInstrument.vue')
          }
        ]
      },
      {
        path: 'Text',
        meta: {
          icon: '测试',
          title: '测试',
          id: '1602428118692401153'
        },
        component: () => import('@/views/Test/TestIndex.vue')
      }
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes: constantRoutes
})

const constantRoutesPath = constantRoutes.map(route => route.path)

router.beforeEach((to, form, next) => {
  const globalStore = useGlobalStore()
  globalStore.showPage = false
  NProgress.start()
  if (constantRoutesPath.includes(to.path)) {
    next()
  } else {
    const permissionStore = usePermissionStore()
    const userStore = useUserStore()
    if (!permissionStore.isHandle) {
      // if (localStorage.getItem('permissionNameList')){
      const addRoutesLength = permissionStore.setAsyncRoutes()
      if (addRoutesLength) {
        router.replace(to.path)
      }else{
        userStore.logout()
      }
      // }else{
      //   userStore.logout()
      // }
    }else{
      next()
    }
  }
})

router.afterEach(() => {
  const globalStore = useGlobalStore()
  globalStore.showPage = true
  NProgress.done()
})

export default router